package com.zhonghui.procurement.controller;

import com.zhonghui.common.core.controller.BaseController;
import com.zhonghui.procurement.domain.ProcurementPush;
import com.zhonghui.procurement.service.IProcurementPushService;
import com.zhonghui.response.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/push")
public class ProcurementPushController extends BaseController {

    @Autowired
    private IProcurementPushService procurementPushService;

    /**
     * 查询采购-推送
     列表
     */
    @GetMapping("/list")
    public BaseResult list(ProcurementPush procurementPush)
    {
        List<ProcurementPush> list = procurementPushService.selectProcurementPushList(procurementPush);
        return BaseResult.success(list);
    }

    @PostMapping("/addPush")
    public BaseResult add(@RequestBody ProcurementPush procurementPush)
    {
        return BaseResult.success(procurementPushService.insertProcurementPush(procurementPush));
    }

}
